<admintpl file="header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
     		<li><a href="{:U('Analysis/index')}">数据汇总</a></li>
     		<li><a href="{:U('Analysis/day')}">单日统计</a></li>
            <li class="active"><a href="{:U('Analysis/activity')}">活动统计</a></li>
            <li><a href="{:U('Analysis/materials')}">物料统计</a></li>
            <li><a href="{:U('Analysis/equipment')}">设备统计</a></li>
            <li><a href="{:U('Analysis/users')}">用户统计</a></li>
            <li><a href="{:U('Analysis/winning')}">中奖记录</a></li>
            <li><a href="{:U('Analysis/withdraw')}">提现记录</a></li>
            <li><a href="{:U('Analysis/logs')}">摇摇记录</a></li>
            <li><a href="{:U('Analysis/urls')}">链接记录</a></li>
        </ul>
        <form class="well form-search js-ajax-form" method="post" action="{:U('Analysis/activity')}">
        	活动名称:
            <select name="keyword">
            	<option value="0">请选择</option>
                <foreach name="eventids" item="vo">
                    <option <if condition="(I('param.keyword') eq $vo['event_id'])" >selected</if> value="{$vo.event_id}">{$vo.name}</option>
                </foreach>
            </select>
            	时间范围:
            <input type="text" name="start_time" style="width: 80px;" class="js-date" value="{:I('param.start_time')}" autocomplete="off"> ~
            <input type="text" name="end_time" style="width: 80px;" class="js-date" value="{:I('param.end_time')}" autocomplete="off">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <if condition="$count" >共查询到 {$count} 条数据</if>
        	<button class="btn btn-primary js-ajax-submit" type="submit" data-action="{:U('Analysis/outactivitycsv')}">查询导出</button>

        </form>
   <if condition="I('param.')" >以上条件查询<else />昨日</if>汇总数据：
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>活动部署设备量</th>
                        <th>进入人数</th>
                        <th>进入次数</th>
                        <th>物料数量</th>
                        <th>中奖次数</th>
                        <th>未中奖次数</th>
                    </tr>
                </thead>
                <foreach name="tsum" item="vo">
                    <tr>
                        <td>{$vo.device}</td>
                        <td>{$vo.enter_uv}</td>
                        <td>{$vo.enter_pv}</td>
                        <td>{$vo.materials}</td>
                		<td>{$vo.winning}</td>
                        <td>{$vo.nowinning}</td>
                    </tr>
                </foreach>
            </table><br>
   <if condition="I('param.')" >以上条件查询<else />每日</if>数据：
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                    	<th>活动名称</th>
                    	<th>日期</th>
                        <th>活动部署设备量</th>
                        <th>进入人数</th>
                        <th>进入次数</th>
                        <th>物料数量</th>
                        <th>中奖次数</th>
                        <th>未中奖次数</th>
                    </tr>
                </thead>
                <foreach name="analysis" item="vo">
                    <tr>
                        <td>{$vo.name} - {$vo.event_id}</td>
                        <td>{$vo.datetime}</td>
                        <td>{$vo.device}</td>
                        <td>{$vo.enter_uv}</td>
                        <td>{$vo.enter_pv}</td>
                        <td>{$vo.materials}</td>
                		<td>{$vo.winning}</td>
                        <td>{$vo.nowinning}</td>
                    </tr>
                </foreach>
                <thead>
                    <tr>
                    	<th>活动名称</th>
                    	<th>日期</th>
                        <th>活动部署设备量</th>
                        <th>进入人数</th>
                        <th>进入次数</th>
                        <th>物料数量</th>
                        <th>中奖次数</th>
                        <th>未中奖次数</th>
                    </tr>
                </thead>
            </table>
            <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
</body>
</html>